package 创建者模式.工厂模式.工厂方法模式;

public class CoffeeStore {
    private  CoffeeFactory factory;

    public void setFactory(CoffeeFactory factory) {
        this.factory = factory;
    }

    public Coffee orderCoffee(){
        Coffee coffee=factory.creatCoffee();
        coffee.addMilk();
        coffee.addSugar();
        return coffee;
    }
}
